package cn.demographic.controller;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.fasterxml.jackson.core.JsonProcessingException;

@RestController
@RequestMapping("/index")
public class IndexController{
	
	/**
	 * 点击退出按钮，销毁session
	 * @param drugCategory
	 * @return
	 * @throws JsonProcessingException 
	 */
	@RequestMapping("/exit")
	public Map<String,Object> selectDrugCategory (HttpSession session)  {
		//销毁session
		session.invalidate();
		Map<String,Object> map = new HashMap<String,Object>();
		return map;
	}
}
